local ThemeStyleIndent = function()
  local style = {
    indent = true,
    chunk = true,
    indentStyle = vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID("Whitespace")), "fg", "gui")
    -- indentStyle = vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID("IblIndent")), "fg", "gui")
  };
  if vim.g.colors_name == "vscode" then
    style.indent = true
    style.chunk = true
    style.chunkStyle = "#4F4F4F"
    style.indentStyle = "#2F2F2F"
  else
    style.chunkStyle = "#806d9c"
  end
  if vim.g.colors_name == "deus" then
    style.indentStyle = "#211a32"
  end
  if vim.g.colors_name == "everforest" then
    style.chunkStyle = "#4f585e"
    style.indentStyle = "#394147"
  end
  if vim.g.colors_name == "catppuccin-mocha" then
    style.chunk = true
    style.indent = true
    style.chunkStyle = "#45475a"
    style.indentStyle = "#313244"
  end
  return style
end


-- ==================== hlchunk.nvim ====================
require('hlchunk').setup({
  chunk = {
    enable = ThemeStyleIndent().chunk,
    use_treesitter = true,
    max_file_size = 100 * 1024,
    chars = {
      horizontal_line = "─",
      vertical_line = "├",
      left_top = "┌",
      left_bottom = "└",
      right_arrow = ">",
    },
    style = {
      { fg = ThemeStyleIndent().chunkStyle },
    },
    exclude_filetypes = {
      dart = true,
    }
  },
  indent = {
    enable = ThemeStyleIndent().indent,
    -- chars = { "├",},
    chars = { "│", },
    -- chars = {""}
    -- chars = { "│", "¦", "┆", "┊", },
    -- chars = { "│", "├"},
    use_treesitter = false,
    style = {
      { fg = ThemeStyleIndent().indentStyle }
    },
    exclude_filetypes = {
      coctree = true,
      startify = true,
      lisp = true,
      flutterOutline = true,
      dart = true,
      vista = true,
      -- explorer = true,
    },
  },
  blank = {
    enable = false,
  },
  line_num = {
    enable = false,
    use_treesitter = false,
    srtle = "#806d9c",
    -- style = "#b4befe",
  },
})
